package com.sync.syncmasterdata.defdoc.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
 * 自定义档案通用对象
 */
@Data
@Builder
public class DefDocDTO {
    @Builder.Default
    private String account = "01";
    @Builder.Default
    private String billtype = "defdoc";
    @Builder.Default
    private String sender = "syncMaster";
    @Builder.Default
    private String isexchange = "Y";
    @Builder.Default
    private String replace = "Y";
    @Builder.Default
    private String groupcode = "BS";
    @Builder.Default
    private String roottag = "bill";

    private List<DefDocBill> bill;

    @Data
    @Builder
    public static class DefDocBill {
        private DefDocBillHead billhead;

        private String id;

        @Data
        @JsonInclude(JsonInclude.Include.NON_NULL)
        public static class DefDocBillHead {
            /**
             * 编码
             */
            private String code;
            /**
             * 备注
             */
            private String memo;
            /**
             * 名称
             */
            private String name;
            /**
             * 上级档案
             */
            private String pid;
            /**
             * 自定义档案 名称
             */
            private String pk_defdoclist;
            /**
             * 所属集团
             */
            private String pk_group;
            /**
             * 所属组织
             */
            private String pk_org;

        }
    }
}
